<?php
namespace BP\WF\HttpHandler;
use think\Db;
use NetObjectForPhp\Hashtable;
use BP\Sys\SystemConfig;
use BP\DA\DBAccess;
use \think\Request;
use app\common\controller\DirectoryPageBase;

class WF_Comm extends DirectoryPageBase{
    function _initialize()
    {
        parent::_initialize();
    }
   function __construct() {

   }
   public function EntitiesInit($para)
    {
        //这里要用到反射，这三个类过于复杂，先让过
        if($para->EnsName=="BP.WF.Nodes")
        {
            return "[{\"NodeID\":19601,\"Name\":\"申请\",\"Tip\":\"\",\"Step\":1,\"ICON\":\"前台\",\"NodeWorkType\":1,\"SubThreadType\":0,\"FK_Flow\":\"196\",\"IsGuestNode\":0,\"FlowName\":\"延续流程主流程\",\"FrmAttr\":\"\",\"IsBUnit\":0,\"FWCSta\":0,\"FWC_H\":0.0,\"FWCOrderModel\":0,\"TimeLimit\":2.0,\"TWay\":0,\"TAlertRole\":0,\"TAlertWay\":0,\"WarningDay\":1.0,\"WAlertRole\":0,\"WAlertWay\":0,\"TCent\":2.0,\"CHWay\":0,\"IsEval\":0,\"OutTimeDeal\":0,\"DoOutTime\":\"\",\"FWCNodeName\":\"\",\"Doc\":\"\",\"IsTask\":\"1\",\"ReturnRole\":0,\"ReturnReasonsItems\":\"\",\"ReturnAlert\":\"\",\"ReturnOneNodeRole\":0,\"ReturnField\":\"\",\"DeliveryWay\":4,\"IsExpSender\":1,\"CancelRole\":0,\"CancelDisWhenRead\":0,\"WhenNoWorker\":0,\"DeliveryParas\":\"\",\"NodeFrmID\":\"\",\"CCRole\":0,\"CCWriteTo\":0,\"DelEnable\":0,\"SaveModel\":0,\"IsCanDelFlow\":0,\"ThreadKillRole\":0,\"TodolistModel\":0,\"TeamLeaderConfirmRole\":0,\"TeamLeaderConfirmDoc\":\"\",\"IsAllowRepeatEmps\":0,\"IsBackTracking\":0,\"IsRM\":1,\"IsHandOver\":\"0\",\"PassRate\":100.0,\"RunModel\":0,\"BlockModel\":0,\"BlockExp\":\"\",\"BlockAlert\":\"\",\"WhoExeIt\":0,\"ReadReceipts\":0,\"CondModel\":2,\"AutoJumpRole0\":0,\"AutoJumpRole1\":0,\"AutoJumpRole2\":0,\"SFActiveFlows\":\"\",\"BatchRole\":0,\"BatchListCount\":12,\"BatchParas\":\"\",\"PrintDocEnable\":0,\"FormType\":1,\"FormUrl\":\"http://\",\"TurnToDeal\":0,\"TurnToDealDoc\":\"\",\"NodePosType\":0,\"IsCCFlow\":0,\"HisStas\":\"\",\"HisDeptStrs\":\"\",\"HisToNDs\":\"@19602\",\"HisBillIDs\":\"\",\"HisSubFlows\":\"\",\"PTable\":\"\",\"ShowSheets\":\"\",\"GroupStaNDs\":\"@19601@19602@19603\",\"X\":150,\"Y\":105,\"FocusField\":\"\",\"JumpToNodes\":\"\",\"RefOneFrmTreeType\":\"\",\"AtPara\":\"\",\"SubFlowStartWay\":0,\"SubFlowStartParas\":\"\",\"AutoRunEnable\":0,\"AutoRunParas\":\"\",\"SelfParas\":\"\"},{\"NodeID\":19602,\"Name\":\"越轨流程节点\",\"Tip\":\"\",\"Step\":2,\"ICON\":\"审核\",\"NodeWorkType\":0,\"SubThreadType\":0,\"FK_Flow\":\"196\",\"IsGuestNode\":0,\"FlowName\":\"延续流程主流程\",\"FrmAttr\":\"\",\"IsBUnit\":0,\"FWCSta\":0,\"FWC_H\":0.0,\"FWCOrderModel\":0,\"TimeLimit\":2.0,\"TWay\":0,\"TAlertRole\":0,\"TAlertWay\":0,\"WarningDay\":1.0,\"WAlertRole\":0,\"WAlertWay\":0,\"TCent\":2.0,\"CHWay\":0,\"IsEval\":0,\"OutTimeDeal\":0,\"DoOutTime\":\"\",\"FWCNodeName\":\"\",\"Doc\":\"\",\"IsTask\":\"1\",\"ReturnRole\":2,\"ReturnReasonsItems\":\"\",\"ReturnAlert\":\"\",\"ReturnOneNodeRole\":0,\"ReturnField\":\"\",\"DeliveryWay\":4,\"IsExpSender\":1,\"CancelRole\":0,\"CancelDisWhenRead\":0,\"WhenNoWorker\":0,\"DeliveryParas\":\"\",\"NodeFrmID\":\"\",\"CCRole\":0,\"CCWriteTo\":0,\"DelEnable\":0,\"SaveModel\":0,\"IsCanDelFlow\":0,\"ThreadKillRole\":0,\"TodolistModel\":0,\"TeamLeaderConfirmRole\":0,\"TeamLeaderConfirmDoc\":\"\",\"IsAllowRepeatEmps\":0,\"IsBackTracking\":0,\"IsRM\":1,\"IsHandOver\":\"0\",\"PassRate\":100.0,\"RunModel\":0,\"BlockModel\":0,\"BlockExp\":\"\",\"BlockAlert\":\"\",\"WhoExeIt\":0,\"ReadReceipts\":0,\"CondModel\":2,\"AutoJumpRole0\":0,\"AutoJumpRole1\":0,\"AutoJumpRole2\":0,\"SFActiveFlows\":\"\",\"BatchRole\":0,\"BatchListCount\":12,\"BatchParas\":\"\",\"PrintDocEnable\":0,\"FormType\":1,\"FormUrl\":\"http://\",\"TurnToDeal\":0,\"TurnToDealDoc\":\"\",\"NodePosType\":1,\"IsCCFlow\":0,\"HisStas\":\"\",\"HisDeptStrs\":\"\",\"HisToNDs\":\"@19603\",\"HisBillIDs\":\"\",\"HisSubFlows\":\"\",\"PTable\":\"\",\"ShowSheets\":\"\",\"GroupStaNDs\":\"@19601@19602@19603\",\"X\":262,\"Y\":215,\"FocusField\":\"\",\"JumpToNodes\":\"\",\"RefOneFrmTreeType\":\"\",\"AtPara\":\"\",\"SubFlowStartWay\":0,\"SubFlowStartParas\":\"\",\"AutoRunEnable\":0,\"AutoRunParas\":\"\",\"SelfParas\":\"\"},{\"NodeID\":19603,\"Name\":\"结束\",\"Tip\":\"\",\"Step\":3,\"ICON\":\"审核.png\",\"NodeWorkType\":0,\"SubThreadType\":0,\"FK_Flow\":\"196\",\"IsGuestNode\":0,\"FlowName\":\"延续流程主流程\",\"FrmAttr\":\"\",\"IsBUnit\":0,\"FWCSta\":0,\"FWC_H\":300.0,\"FWCOrderModel\":0,\"TimeLimit\":2.0,\"TWay\":0,\"TAlertRole\":0,\"TAlertWay\":0,\"WarningDay\":1.0,\"WAlertRole\":0,\"WAlertWay\":0,\"TCent\":2.0,\"CHWay\":0,\"IsEval\":0,\"OutTimeDeal\":0,\"DoOutTime\":\"\",\"FWCNodeName\":\"\",\"Doc\":\"\",\"IsTask\":\"1\",\"ReturnRole\":2,\"ReturnReasonsItems\":\"\",\"ReturnAlert\":\"\",\"ReturnOneNodeRole\":0,\"ReturnField\":\"\",\"DeliveryWay\":3,\"IsExpSender\":1,\"CancelRole\":0,\"CancelDisWhenRead\":0,\"WhenNoWorker\":0,\"DeliveryParas\":\"\",\"NodeFrmID\":\"\",\"CCRole\":0,\"CCWriteTo\":0,\"DelEnable\":0,\"SaveModel\":0,\"IsCanDelFlow\":0,\"ThreadKillRole\":0,\"TodolistModel\":0,\"TeamLeaderConfirmRole\":0,\"TeamLeaderConfirmDoc\":\"\",\"IsAllowRepeatEmps\":0,\"IsBackTracking\":0,\"IsRM\":1,\"IsHandOver\":\"0\",\"PassRate\":100.0,\"RunModel\":0,\"BlockModel\":0,\"BlockExp\":\"\",\"BlockAlert\":\"\",\"WhoExeIt\":0,\"ReadReceipts\":0,\"CondModel\":2,\"AutoJumpRole0\":0,\"AutoJumpRole1\":0,\"AutoJumpRole2\":0,\"SFActiveFlows\":\"\",\"BatchRole\":0,\"BatchListCount\":12,\"BatchParas\":\"\",\"PrintDocEnable\":0,\"FormType\":1,\"FormUrl\":\"http://\",\"TurnToDeal\":0,\"TurnToDealDoc\":\"\",\"NodePosType\":2,\"IsCCFlow\":0,\"HisStas\":\"\",\"HisDeptStrs\":\"\",\"HisToNDs\":\"\",\"HisBillIDs\":\"\",\"HisSubFlows\":\"\",\"PTable\":\"\",\"ShowSheets\":\"\",\"GroupStaNDs\":\"@19601@19602@19603\",\"X\":442,\"Y\":300,\"FocusField\":\"\",\"JumpToNodes\":\"\",\"RefOneFrmTreeType\":\"\",\"AtPara\":\"\",\"SubFlowStartWay\":0,\"SubFlowStartParas\":\"\",\"AutoRunEnable\":0,\"AutoRunParas\":\"\",\"SelfParas\":\"\"}]";
        }
        elseif ($para->EnsName=="BP.WF.Template.Directions")
        {
            return "[{\"MyPK\":\"196_19601_19602\",\"FK_Flow\":\"196\",\"Node\":19601,\"ToNode\":19602,\"IsCanBack\":0,\"Dots\":\"\"},{\"MyPK\":\"196_19602_19603\",\"FK_Flow\":\"196\",\"Node\":19602,\"ToNode\":19603,\"IsCanBack\":0,\"Dots\":\"\"}]";
        }
        elseif($para->EnsName=="BP.WF.Template.LabNotes"){
            return "[{\"MyPK\":\"196_576_110_1\",\"Name\":\"子流程结束后有三种情况.------------------------------------1.不处理(让父流程出现待办).2.自动运行到下一步骤. 如果自动运行到下一步骤，设置可以找到人可以找到到达的节点. 就可以, 否则不要选择这个规则.3.结束父流程. \",\"FK_Flow\":\"196\",\"X\":576,\"Y\":110}]";        }
    }
    public function  webUserInit()
    {
        return "{\"CustomerNo\":\"CCFlow\",\"FK_DeptNameOfFull\":\"\",\"CustomerName\":\"驰骋工作流\",\"FK_DeptName\":\"集团总部\",\"No\":\"admin\",\"FK_Dept\":\"100\",\"SID\":\"b4vvnww1iyrwpu3dmxyqhsm2\",\"GroupNo\":\"0\",\"Name\":\"admin\",\"EndJSON\":\"0\"}";
    }
 
}